//
//  OrderDetailAddressCell.m
//  PPDL
//
//  Created by 王洋 on 2019/8/2.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "OrderDetailAddressCell.h"

@interface OrderDetailAddressCell ()

@end

@implementation OrderDetailAddressCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.orderNoAddressNotiLab.hidden = NO;

}

- (void)fillCellWithModel:(AddressItemModel *)model {
    
    if (!model.addressName.length && !model.addressDesc.length && !model.addressPhone.length) {
        self.orderNoAddressNotiLab.hidden = NO;
    } else {
        self.orderNoAddressNotiLab.hidden = YES;
    }
    
    self.reciverName.text = [NSString stringWithFormat:@"收货人：%@",model.addressName];
    
    NSString *reciverAddress = [NSString stringWithFormat:@"%@%@%@%@",model.provence.length?model.provence:@"",model.city.length?model.city:@"",model.area.length?model.area:@"",model.addressDesc];
    
    self.reciverAddress.text = reciverAddress;
    
    self.receivePhone.text = [NSString stringWithFormat:@"%@",model.addressPhone.length?model.addressPhone:@"手机号未填写"];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
